var data = {
    // 主题
    themes: [{
        id: 0,
        name: '推荐',
        index: 0
    }, {
        id: 1,
        name: '视频',
        index: 1
    }, {
        id: 2,
        name: '直播',
        index: 2
    }, {
        id: 3,
        name: '旅行',
        index: 3
    }, {
        id: 4,
        name: '摄影',
        index: 4
    }, {
        id: 5,
        name: '游戏',
        index: 5
    }, {
        id: 6,
        name: '科技数码',
        index: 6
    }],
    items: [{
            "id": 64,
            "title": "消选米严经林",
            "context": "器华点定周达给样年极阶米直格被了。油议积例强同满满能等老万资造江调。省价权具较精指上发等亲总史。今信利其连织响两军或起维论。",
            "likes": 67,
            "pictures": [{
                    "url": "https://picsum.photos/seed/HyvOvIqoy/640/640"
                },
                {
                    "url": "https://picsum.photos/seed/YvOjz9Dp/640/640"
                },
                {
                    "url": "https://picsum.photos/seed/BD5HaIc/640/640"
                }
            ],
            "user": {
                "name": "贾洋",
                "avatarUrl": "https://cdn.jsdelivr.net/gh/faker-js/assets-person-portrait/female/512/3.jpg"
            }
        },
        {
            "id": 43,
            "title": "见府再始增选",
            "context": "想级报西青打里土他称大联话及维为。八门始毛值会严前属很许点参。下或例立物做元委天心史化外数听。月多新除计广却长角理表生花极。群第类强议金六其放造济报把行。图办那好中年形技张样任十全。状标方去真动安造产深须酸研社行断极。",
            "likes": 65,
            "pictures": [{
                    "url": "https://loremflickr.com/640/640?lock=7133130017796453"
                },
                {
                    "url": "https://loremflickr.com/640/640?lock=1030640732265685"
                },
                {
                    "url": "https://picsum.photos/seed/XYh03O4/640/640"
                },
                {
                    "url": "https://loremflickr.com/640/640?lock=2162091789280069"
                }
            ],
            "user": {
                "name": "贾磊",
                "avatarUrl": "https://cdn.jsdelivr.net/gh/faker-js/assets-person-portrait/male/512/80.jpg"
            }
        },
        {
            "id": 14,
            "title": "总龙开运按己率",
            "context": "需达科青需人如示公火道长。接现车温划门地较圆条越音天亲。决料据九难发着风可个只基用示于转置。学然越直术示想始族方约体价段多好它。受清些过细员太都光清种五型平。",
            "likes": 91,
            "pictures": [{
                    "url": "https://picsum.photos/seed/Mn8DEF1tbl/640/640"
                },
                {
                    "url": "https://picsum.photos/seed/tuU2FBzj/640/640"
                }
            ],
            "user": {
                "name": "赵静",
                "avatarUrl": "https://cdn.jsdelivr.net/gh/faker-js/assets-person-portrait/female/512/99.jpg"
            }
        },
        {
            "id": 94,
            "title": "然称称七",
            "context": "它保千好作给习体眼始主此流那影收。打通增东京气质温保指快张术毛生型车。民厂知边来立人长种他更支构还。府声必报条权便特断等里处国青相住。以引十金究之儿局劳少品想分办结。作权历时示由利我七建带及身史带商件。一己专确确几统布老达在路。",
            "likes": 14,
            "pictures": [{
                    "url": "https://loremflickr.com/640/640?lock=5638608783427446"
                },
                {
                    "url": "https://picsum.photos/seed/hZpzoTaq/640/640"
                },
                {
                    "url": "https://loremflickr.com/640/640?lock=5621486480666020"
                },
                {
                    "url": "https://loremflickr.com/640/640?lock=4502063152271824"
                },
                {
                    "url": "https://picsum.photos/seed/pPU4jmIx4/640/640"
                }
            ],
            "user": {
                "name": "唐敏",
                "avatarUrl": "https://cdn.jsdelivr.net/gh/faker-js/assets-person-portrait/male/512/42.jpg"
            }
        },
        {
            "id": 19,
            "title": "精很做参",
            "context": "构须已必真算阶使主音引层为据公几。心习见对组影条属列转学非这王。拉果以光压设王听作确习美反统。切化于体铁该争大话老级北样心持构。县论打深影对要转点已美取置车认决却。价单物类成身联府无原比九看。",
            "likes": 19,
            "pictures": [],
            "user": {
                "name": "方强",
                "avatarUrl": "https://cdn.jsdelivr.net/gh/faker-js/assets-person-portrait/male/512/35.jpg"
            }
        },
        {
            "id": 73,
            "title": "或统得但习家",
            "context": "那始东美部响自声识治被从一六自。后产象规反来量能给列下入节本般。参公是放品重将机东局样眼却值管并。几层高公须气者完即下生利以元重。义位写研料给同清技带导构做达。",
            "likes": 51,
            "pictures": [{
                    "url": "https://loremflickr.com/640/640?lock=1219291829430617"
                },
                {
                    "url": "https://picsum.photos/seed/cWewF/640/640"
                }
            ],
            "user": {
                "name": "崔敏",
                "avatarUrl": "https://avatars.githubusercontent.com/u/39135023"
            }
        },
        {
            "id": 13,
            "title": "置相此理设真",
            "context": "解条亲争必商真部省组计等新需要火话三。今五新两制型张原科劳转权发便。再花带八府消内此方半对走。空加西至济低体起点走养性技海月列界。立适始时路价存地名图市置际况极复。存公已质深又三土不油理么易马那速阶。听步期质权热过治海改江高叫共。",
            "likes": 40,
            "pictures": [{
                "url": "https://picsum.photos/seed/NFLZYBk8/640/640"
            }],
            "user": {
                "name": "邓明",
                "avatarUrl": "https://cdn.jsdelivr.net/gh/faker-js/assets-person-portrait/male/512/63.jpg"
            }
        }
    ]

}

function getData(pageNo, type) {
    var result = {};
    result.themes = data.themes;

    var contents = [];

    contents = data.items;

    var offset = (pageNo - 1) * 6;
    result.items = (offset + 6 >= contents.length) ? contents.slice(offset, contents.length) : contents.slice(offset, offset + 6);
    return result;
}

module.exports = {
    getData: getData,
}